package com.zeny.web;

import com.zeny.utils.MyRestTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @ClassName WebApplication
 * @Description TODO
 * @Author zeny
 */
@SpringBootApplication
@ComponentScan("com.zeny")
@EnableDiscoveryClient
@RestController
public class WebApplication {
    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
    }

    private static Logger logger = LoggerFactory.getLogger("kafka");



    @LoadBalanced
    @Bean
    public RestTemplate getRestTemplate() {
        return new MyRestTemplate();
    }
}
